package utils;

import java.util.List;

public class PageUtils<T> {
	private int pageindex=1;
	private int pagesize=8;
	private int pagetotal;
	private int pagecount;
	private List<T> list;
	public int getPageindex() {
		return pageindex;
	}
	public void setPageindex(int pageindex) {
		this.pageindex = pageindex;
	}
	public int getPagesize() {
		return pagesize;
	}
	public void setPagesize(int pagesize) {
		this.pagesize = pagesize;
	}
	public int getPagetotal() {
		return pagetotal;
	}
	public void setPagetotal(int pagetotal) {
		
		this.pagetotal = pagetotal;
		this.pagecount=this.pagetotal/pagesize;
		if (this.pagecount%2!=0) {
			this.pagecount++;
		}
		if (this.pagetotal<pagesize) {
			this.pagecount++;
		}
	}
	public int getPagecount() {
		return pagecount;
	}
	public void setPagecount(int pagecount) {
		this.pagecount = pagecount;
	}
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}

}
